<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="using:GarDataView.ViewModels"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="400"
        x:Class="GarDataView.Views.MainWindow"
        x:DataType="vm:MainWindowViewModel"
        Width="600" Height="400" MinWidth="200" MinHeight="100"
        Icon="/Assets/avalonia-logo.ico"
        Title="GarDataView">

    <Design.DataContext>
        <vm:MainWindowViewModel/>
    </Design.DataContext>
    
    <ScrollViewer>
        <Grid ColumnDefinitions="Auto,*" RowDefinitions="Auto,Auto,*" Margin="10">
            <TextBlock Text="Connection:" VerticalAlignment="Center" Margin="5"/>
            <TextBox Grid.Column="1" Grid.Row="0" Text="{Binding ConnectionString}" VerticalAlignment="Stretch"/>
            <TextBlock Grid.Column="0" Grid.Row="1" Text="GAR archive:" VerticalAlignment="Center" Margin="5"/>
            <TextBox Grid.Column="1" Grid.Row="1" Text="{Binding ArchivePath}" VerticalAlignment="Stretch"/>
            <WrapPanel Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Margin="5">
                <Button Content="Load address objects to DB" Command="{Binding InsertAddressObjects}"/>
                <Button Content="Load relations to DB" Command="{Binding InsertItemRelations}"/>
                <Button Content="Load houses to DB" Command="{Binding InsertHouseObjects}"/>
            </WrapPanel>
        </Grid>
    </ScrollViewer>
</Window>
